package com.ruoyi.project.ledger.mapper;

import java.util.List;
import java.util.Map;

import com.ruoyi.project.ledger.domain.LedgerBusinessWorker;
import org.springframework.stereotype.Repository;

/**
 * 经营户人员Mapper接口
 *
 * @author gwc
 * @date 2020-05-08
 */
@Repository
public interface LedgerBusinessWorkerMapper
{
    /**
     * 查询经营户人员
     *
     * @param id 经营户人员ID
     * @return 经营户人员
     */
    public LedgerBusinessWorker selectLedgerBusinessWorkerById(Long id);

    /**
     * 查询经营户人员列表
     *
     * @param ledgerBusinessWorker 经营户人员
     * @return 经营户人员集合
     */
    public List<LedgerBusinessWorker> selectLedgerBusinessWorkerList(LedgerBusinessWorker ledgerBusinessWorker);

    /**
     * 新增经营户人员
     *
     * @param ledgerBusinessWorker 经营户人员
     * @return 结果
     */
    public int insertLedgerBusinessWorker(LedgerBusinessWorker ledgerBusinessWorker);

    /**
     * 修改经营户人员
     *
     * @param ledgerBusinessWorker 经营户人员
     * @return 结果
     */
    public int updateLedgerBusinessWorker(LedgerBusinessWorker ledgerBusinessWorker);

    /**
     * 删除经营户人员
     *
     * @param id 经营户人员ID
     * @return 结果
     */
    public int deleteLedgerBusinessWorkerById(Long id);

    /**
     * 批量删除经营户人员
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteLedgerBusinessWorkerByIds(Long[] ids);

    /**
     *  获取根据人员id获取经营户人员岗位
     * @param businessWorkerId
     * @return
     */
    public List<String> selectBusinessWorkerPost(Long businessWorkerId);

    /**
     * 批量新增经营户人员岗位关系
     * @param list
     * @return
     */
    public int batchInsertBusinessWorkerPost(List<Map<String, Object>> list);

    /**
     *  根据经营户人员id删除人员岗位关系
     * @param businessWorkerId
     * @return
     */
    public int deletePostByBusinessWorkerId(Long businessWorkerId);

    /**
     *  验证人员唯一性判断
     * @param ledgerBusinessWorker
     * @return
     */
    public int checkWorkerNameUnique(LedgerBusinessWorker ledgerBusinessWorker);

    public LedgerBusinessWorker selectLedgerBusinessWorkerByNameAndBusinessId(LedgerBusinessWorker ledgerBusinessWorker);
}
